/**
 * Created by chengke on 2018/2/28.
 */

let Sequelize = require('sequelize');

let sequelize = require('./db.js').webAccount;

module.exports = sequelize.define('campaign', {
    id: {
        comment: '主键',
        primaryKey: true,
        type: Sequelize.INTEGER
    },
    categoryId: {
        type: Sequelize.STRING,
        field: 'category_id'
    },
    campaignId: {
        type: Sequelize.STRING,
        field: 'campaign_id'
    },
    campaignName: {
        type: Sequelize.STRING,
        field: 'campaign_name'
    },
    budget: {
        type: Sequelize.STRING,
        field: 'budget'
    },
    regionTarget: {
        type: Sequelize.STRING,
        field: 'region_target'
    },
    negativeWords: {
        type: Sequelize.STRING,
        field: 'negative_words'
    },
    exactNegativeWords: {
        type: Sequelize.STRING,
        field: 'exact_negative_words'
    },
    showProb: {
        type: Sequelize.STRING,
        field: 'show_prob'
    },
    device: {
        type: Sequelize.STRING,
        field: 'device'
    },
    priceRatio: {
        type: Sequelize.STRING,
        field: 'price_ratio'
    },
    pcPriceRatio: {
        type: Sequelize.STRING,
        field: 'pc_price_ratio'
    },
    pause: {
        type: Sequelize.STRING,
        field: 'pause'
    },
    rmktStatus: {
        type: Sequelize.STRING,
        field: 'rmkt_status'
    },
    status: {
        type: Sequelize.STRING,
        field: 'status'
    },
    campaignType: {
        type: Sequelize.STRING,
        field: 'campaign_type'
    },
    bidPrefer: {
        type: Sequelize.STRING,
        field: 'bid_prefer'
    },
    isDynamicCreative: {
        type: Sequelize.STRING,
        field: 'is_dynamic_creative'
    },
    isDynamicTagSublink: {
        type: Sequelize.STRING,
        field: 'is_dynamic_tag_sublink'
    },
    isDynamicTitle: {
        type: Sequelize.STRING,
        field: 'is_dynamic_title'
    },
    isDynamicHotRedirect: {
        type: Sequelize.STRING,
        field: 'is_dynamic_hot_redirect'
    },
    rmktPriceRatio: {
        type: Sequelize.STRING,
        field: 'rmkt_price_ratio'
    }
}, {
    underscored: true,
    freezeTableName: true
});